﻿CREATE TABLE [dbo].[AngajatiRetineri] (
    [IDAngajatRetinere] INT             IDENTITY (1, 1) NOT NULL,
    [IDPersoana]        INT             NOT NULL,
    [IDTipRetinere]     INT             NOT NULL,
    [Valoare]           DECIMAL (18, 2) CONSTRAINT [DF_AngajatiRetineri_Valoare] DEFAULT ((0)) NOT NULL,
    [Luna]              SMALLINT        CONSTRAINT [DF_AngajatiRetineri_Luna] DEFAULT ((1)) NOT NULL,
    [Anul]              SMALLINT        CONSTRAINT [DF_AngajatiRetineri_Anul] DEFAULT ((2000)) NOT NULL,
    CONSTRAINT [PK_AngajatiRetineri] PRIMARY KEY CLUSTERED ([IDAngajatRetinere] ASC),
    CONSTRAINT [FK_AngajatiRetineri_Persoane] FOREIGN KEY ([IDPersoana]) REFERENCES [dbo].[Persoane] ([IdPersoana]),
    CONSTRAINT [FK_AngajatiRetineri_TipRetinere] FOREIGN KEY ([IDTipRetinere]) REFERENCES [dbo].[TipRetinere] ([IDTipRetinere])
);

